import { findAllCommunity } from "@/api/community";

const state = {
    communityList: []
}

const mutations = {
    SET_COMMUNITY_LIST: (state, list) => {
        state.communityList = list
    },


}

const actions = {
    getCommunityList({ commit, state }) {
        findAllCommunity().then(res => {
            commit('SET_COMMUNITY_LIST', res.data)
        })
    },

}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}